import request from '@/utils/request'
import TimeCalculation from '@/utils/TimeCalculation.js'

//获取机构学生列表
export function getDeptStudentList(data) {
    return request({
        url: '/api/platform/v2/getDeptStudentList?deptId=' + data.deptId + "&name=" + data.name,
        method: 'post',
        headers: {
            isToken: true
        },
        data
    })
}

//获取机构学生的基本信息
export function getStudentBaseData(data) {
    return request({
        url: '/api/platform/v2/getStudentBaseData?studentId=' + data.studentId,
        method: 'post',
        headers: {
            isToken: true
        },
        data
    })
}

//获取学生评估记录列表
export function getStudentRecordList(data) {
    return request({
        url: '/api/platform/v2/getStudentRecordList?studentId=' + data.studentId,
        method: 'post',
        headers: {
            isToken: true
        },
        data
    })
}

//获取课程计划
export function getStudentPlan(data) {
    return request({
        url: '/api/platform/v2/getStudentPlan?studentId=' + data.studentId,
        method: 'post',
        headers: {
            isToken: true
        },
        data
    })
}

//一键审核通过
export function studentPlanAllPass(data) {
    return request({
        url: '/api/platform/v2/studentPlanAllPass?planId=' + data.planId,
        method: 'post',
        headers: {
            isToken: true
        },
        data
    })
}

//审核通过
export function studentPlanPass(data) {
    return request({
        url: '/api/platform/v2/studentPlanPass?planId=' + data.planId,
        method: 'post',
        headers: {
            isToken: true
        },
        data
    })
}

//拒绝
export function studentPlanRefuse(data) {
    return request({
        url: '/api/platform/v2/studentPlanRefuse?planId=' + data.planId,
        method: 'post',
        headers: {
            isToken: true
        },
        data
    })
}

//发送家长
export function sendPlan(data) {
    return request({
        url: '/api/platform/v2/sendPlan?planId=' + data.planId,
        method: 'post',
        headers: {
            isToken: true
        },
        data
    })
}


//课程计划保存修改
export function editPlaById(data) {
    return request({
        url: '/api/platform/v2/editRehabilitationPlan?planId='+data.planId+"&rehabilitationPlan="+data.rehabilitationPlan,
        method: 'post',
        headers: {
            isToken: true
        },
        data
    })
}

//课程计划保存修改
// export function editPlaById(data) {
//     return request({
//         url: '/api/platform/v2/editRehabilitationPlan?planId=' + data.planId + "&rehabilitationPlan=" + data.rehabilitationPlan,
//         method: 'post',
//         headers: {
//             isToken: true
//         },
//         data
//     })
// }

//课程计划保存修改
export function getStudentTeachPlan(data) {
    const queryString = TimeCalculation.objectToQueryString(data);
    return request({
        url: '/api/platform/v2/getStudentTeachPlan?' + queryString,
        method: 'post',
        headers: {
            isToken: true
        },
        data
    })
}

//获取家长签字
export function getTeachPlanSign(data) {
    return request({
        url: '/api/platform/v2/getTeachPlanSign?planId=' + data.planId,
        method: 'post',
        headers: {
            isToken: true
        },
        data
    })
}

// 获取学生PEP-3成效对比（近三次记录）
export function getPep3RecordCompare(studentId) {
    return request({
        url: 'api/platform/v2/getPep3RecordCompare?studentId=' + studentId,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}

// 获取学生PDMS-2成效对比（近三次记录）
export function getPdms2RecordCompare(studentId) {
    return request({
        url: 'api/platform/v2/getPdms2RecordCompare?studentId=' + studentId,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}
// 获取学生课表(封装数据,可选)
export function getStudentTimetablePackage(studentId,searchDate) {
    return request({
        url: 'api/platform/v2/getStudentTimetablePackage?studentId=' + studentId+"&searchDate=" + searchDate,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}
export function getStudentCoursePriceList(studentId,startDate,endDate) {
    return request({
        url: 'api/platform/v2/getStudentCoursePriceList?studentId='+studentId+'&startDate=' + startDate + '&endDate=' + endDate,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}

//获取学生PEP-3的评估信息接口数据
export function getPEP3RecordReport(recordId) {
    return request({
        url: '/api/cpep3/getRecordReport?recordId='+recordId,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}

//获取学生ESDM的评估信息接口数据
export function getESDMRecordReport(recordId) {
    return request({
        url: 'api/esdm/getRecordReport?recordId='+recordId,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}

//获取学生SPM的评估信息接口数据
export function getSPMRecordReport(recordId) {
    return request({
        url: 'api/spm/getRecordReport?recordId='+recordId,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}

//获取学生PDMS2的评估信息接口数据
export function getPDMS2RecordReport(recordId) {
    return request({
        url: 'api/pdms2/getRecordReport?recordId='+recordId,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}

//获取学生VBMAPP的评估信息接口数据
export function getVBMAPPRecordReport(recordId) {
    return request({
        url: 'api/vbmapp/getRecordReport?recordId='+recordId,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}
//获取学生 双溪的评估信息接口数据
export function getSXRecordReport(recordId) {
    return request({
        url: 'api/sx/getRecordReport?recordId='+recordId,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}

// 学生康复计划 ESDM
export function getESDMDomainLabelsReport(recordId) {
    return request({
        url: 'api/esdm/getDomainLabels?recordId='+recordId,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}
//学生康复计划 PDMS-2
export function getPDMS2DomainLabelsReport(recordId) {
    return request({
        url: 'api/pdms2/getDomainLabels?recordId='+recordId,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}
//学生康复计划 PEP-3
export function getPEP3DomainLabelsReport(recordId) {
    return request({
        url: 'api/cpep3/getDomainLabels?recordId='+recordId,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}
//学生康复计划 SPM
export function getSPMDomainLabelsReport(recordId) {
    return request({
        url: 'api/spm/getDomainLabels?recordId='+recordId,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}
//学生康复计划 VB-MAPP
export function getVBMAPPDomainLabelsReport(recordId) {
    return request({
        url: 'api/vbmapp/getDomainLabels?recordId='+recordId,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}
//学生康复计划 双溪
export function getSxDomainLabelsReport(recordId) {
    return request({
        url: 'api/sx/getDomainLabels?recordId='+recordId,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}

//学生答题卡 PEP-3
export function getPEP3AnswerSheet(recordId) {
    return request({
        url: 'api/cpep3/getAnswerSheet?recordId='+recordId,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}

//学生答题卡 ESDM
export function getESDMAnswerSheet(recordId) {
    return request({
        url: 'api/esdm/getAnswerSheet?recordId='+recordId,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}

//学生答题卡 EPDMS2
export function getPDMS2AnswerSheet(recordId) {
    return request({
        url: 'api/pdms2/getAnswerSheet?recordId='+recordId,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}

//学生答题卡 SPM
export function getSPMAnswerSheet(recordId) {
    return request({
        url: 'api/spm/getAnswerSheet?recordId='+recordId,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}

//学生答题卡 双溪
export function getSxAnswerSheet(recordId) {
    return request({
        url: 'api/sx/getAnswerSheet?recordId='+recordId,
        method: 'post',
        headers: {
            isToken: true
        },
    })
}

//获取学生课时信息
export function getStudentCoursePriceList1(data) {
    return request({
        url: '/api/platform/v2/getStudentCoursePriceList?endDate=' + data.endDate + "&startDate=" + data.startDate + "&studentId=" + data.studentId,
        method: 'post',
        headers: {
            isToken: true
        },
        data
    })
}
//获取学生课时信息详细
export function getStudentCoursePriceListDetail(data) {
    return request({
        url: '/api/platform/v2/getStudentCoursePriceListDetail?endDate=' + data.endDate + "&startDate=" + data.startDate + "&studentId=" + data.studentId,
        method: 'post',
        headers: {
            isToken: true
        },
        data
    })
}
//
export function getStudentRoundData(data) {
    return request({
        url: '/api/platform/v2/getStudentRoundData?searchDate=' + data.searchDate + "&studentId=" + data.studentId,
        method: 'post',
        headers: {
            isToken: true
        },
        data
    })
}
